<extend name="Public:template" />
<block name="page_header">
<!-- 订单列表页面  -->
<header class="headerSub clearfix">
    <h2>选择离您最近的小区</h2>
    <a href="{:U('Index/index')}" class="backBtn leftBtn" >返回首页</a>
    <a href="{:U('Cust/index')}" class="rightBtn yellowNorBg">我的小屋</a>
</header>
</block>
<block name="page_body">

<div class="content">
	<!-- 订单列表 -->
	<volist name="shopList" id="val">
	<div class="listContentBox clearfix" style="cursor:pointer" action_url="{:U('Index/doChgshop',array('shop_id'=>$val['id']))}">
		<h2 class="greenGraBg">{$i}.{$val.address}</h2>
		<dl id="shop{$val.id}" class="itemContentBox" style="height:80px;">
			<dd class="" >
				<p>
					<ul>
						<li>【配送区域】：{$val.district}，{$val.deliver_around}</li>
						<li>【联系方式】：{$val.link_way}</li>
					</ul>
				</p>
				<p class="fr">
					<span style="font-weight:700">→</span>
				</p>
			</dd>
		</dl>
	</div>
	</volist>
	<div class="clearfix">&nbsp;</div>
</div>
</block>
<block name="script_footer">
<script type="text/javascript">
$(document).ready(function(){
	$(".listContentBox").on("click",function(){
		$.ajax({
	        'url': $(this).attr('action_url'),
	        'type':"get",
	        'dataType': "json",
	        'success': function (data) {
	        	var error = data['error'];
	        	var message = data['message'];
	        	if(error=='0'){
	        		document.location.href="/Index/index.html"; 
	        	}else{
	        		alert(message);
	        	}
	        }
	    });
	})
})
</script>
</block>